Extract shared contracts to common module and configure OpenAPI#9
Extract shared contracts to common module and configure OpenAPI#9
Conversation
📝 WalkthroughSummary by CodeRabbit
WalkthroughThis PR introduces a new Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment Tip CodeRabbit can generate a title for your PR based on the changes with custom instructions.Set the |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In
`@backend/smartjam-api/src/main/java/com/smartjam/smartjamapi/infrastructure/openapi/OpenApiConfig.java`:
- Around line 29-31: The OpenAPI bean customOpenAPI() wrongly advertises JWT
security via SECURITY_SCHEME_NAME and createSecurityScheme() while no runtime
security exists; either remove the .addSecurityItem(...) and .components(...)
calls from customOpenAPI() so docs no longer claim protected endpoints, or
implement real Spring Security: add a SecurityFilterChain `@Bean`, configure
authentication/authorization rules for your endpoints, and register a JWT
validation filter/AuthenticationProvider so the documented SECURITY_SCHEME_NAME
is actually enforced at runtime. Ensure the chosen approach updates or removes
the createSecurityScheme() usage accordingly.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: b3eb679b-34cd-4687-9cfd-6f986cdc0694
📒 Files selected for processing (17)
backend/settings.gradlebackend/smartjam-analyzer/build.gradlebackend/smartjam-analyzer/src/main/java/com/smartjam/smartjamanalyzer/api/kafka/S3StorageListener.javabackend/smartjam-analyzer/src/main/java/com/smartjam/smartjamanalyzer/domain/model/AnalysisResult.javabackend/smartjam-analyzer/src/main/java/com/smartjam/smartjamanalyzer/domain/service/DtwPerformanceEvaluator.javabackend/smartjam-analyzer/src/test/java/com/smartjam/smartjamanalyzer/api/listener/S3StorageListenerTest.javabackend/smartjam-analyzer/src/test/java/com/smartjam/smartjamanalyzer/application/AudioAnalysisIntegrationTest.javabackend/smartjam-analyzer/src/test/java/com/smartjam/smartjamanalyzer/domain/service/DtwPerformanceEvaluatorTest.javabackend/smartjam-api/build.gradlebackend/smartjam-api/src/main/java/com/smartjam/smartjamapi/infrastructure/openapi/OpenApiConfig.javabackend/smartjam-api/src/main/resources/application.yamlbackend/smartjam-common/build.gradlebackend/smartjam-common/src/main/java/com/smartjam/common/dto/FeedbackEvent.javabackend/smartjam-common/src/main/java/com/smartjam/common/dto/s3/S3EventDto.javabackend/smartjam-common/src/main/java/com/smartjam/common/model/AudioProcessingStatus.javabackend/smartjam-common/src/main/java/com/smartjam/common/model/FeedbackType.javabackend/smartjam-common/src/test/java/common/dto/s3/S3EventDtoTest.java
Цель изменений
Синхронизация протоколов обмена данными между модулями
smartjam-apiиsmartjam-analyzer. Внедрение общего контракта для предотвращения рассинхрона моделей данных; настройка интерактивной документации.Что сделано
Common (smartjam-common):
Infrastructure & Documentation (smartjam-api):